package com.rayc.springsecurity.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class UserController {
    /**
     * 成功
     */
//    @Secured("ROLE_aac")
    @RequestMapping("/toMain")
    public String toMain(){
        System.out.println("---");
        return "redirect:main.html";
    }
    /**
     * 失败
     */
    @RequestMapping("/toError")
    public String toError(){
        System.out.println("---");
        return "redirect:error.html";
    }

}
